package com.ruoyi.es.controller;

import com.ruoyi.es.common.ResultInfo;
import com.ruoyi.es.entily.Video;
import com.ruoyi.es.service.EsVideoService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/es")
public class EsVideoController {

    @Resource
    EsVideoService esVideoService;

    @RequestMapping("/search")
    public ResultInfo search(@RequestBody Video video){
        ResultInfo resultInfo = esVideoService.findByVideo(video);
        return  resultInfo;
    }

}
